<script setup>
import ProductItem from '@/components/ProductItem.vue'

defineProps(['goods', 'title'])
</script>

<template>
  <h1 class="title">{{ title }}</h1>
  <ul class="goods-list">
    <li v-for="item in goods">
      <ProductItem :goods="item"></ProductItem>
    </li>
  </ul>
</template>

<style lang="scss" scoped>
.title {
  height: 50px;
  line-height: 50px;
  font-size: 18px;
  color: white;
  background-color: $helpColor;
}

ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  li {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

    .goods-list {
      height: 100%;
    }
  }
}
</style>
